home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Science / RLaB / README.mac < prev    next >
Text File  |  1994-04-26  |  12KB  |  263 lines

  1.                                                 
  2.                                                             04/25/1994
  3.  
  4.  
  5. This is the Macintosh port of RLaB 0.99b program. RLaB is a Matlab-like 
  6. linear algebra package.  The author is 
  7.     
  8.          Ian Searle
  9.          ians@eskimo.com
  10.     
  11. RLaB is an interpreter for the RLaB Programming Language/Environment. 
  12. The RLaB language is useful for matrix or array oriented numerical
  13. analyses. RLaB is especially useful for prototyping and experimenting 
  14. with algorithms. RLaB extensively uses the LAPACK, FFTPACK and RANLIB 
  15. sources available from netlib and PLPLOT from hagar.ph.utexas.edu.
  16.         
  17. MacRLaB is not a full port of RLaB.  Some items will probably never
  18. be fully supported as they are too tied to the Unix operating system.  
  19. Examples are the 'pipe', the 'fork', the 'socket', and many others.  
  20. Other features are handled a little differently in the Mac version.  
  21. Most of the important differences or extensions of the MacRLaB port 
  22. are described below.
  23.  
  24. 1. Please print out and study the RLaB Primer first, the file is in
  25.    ":doc:rlabp.ps". You can print this Postscript file using 'ShowPages'
  26.    program (simply drag and drop it into ShowPages , assume that 
  27.    you have a Postscript printer connected, of course).
  28.   
  29.    If you cannot access to a Postscript printer, you can run TeX on 
  30.    rlabp.tex to generate rlabp.dvi, then run a DVI conversion program
  31.    to generate a printable file for your printer.
  32.    
  33.    The full history command editing capacity is built-in.  To recall 
  34.    previous commands, just press up and down arrow keys.  
  35.    The 'control' key described in the RLaB Primer can be replaced by the 
  36.    'command' key on the Mac keyboard.  Delete-cursor-character (del) is also 
  37.    supported.  The full description of command line editing is in file
  38.    ":help:COMMAND_EDIT", or type "help COMMAND_EDIT" in RLaB.
  39.    If you need other handy keys, I would like to hear about that.  
  40.  
  41. 2. In this version, you can set up your own file search-path(RLAB_SEARCH_PATH), 
  42.    start-up file (RLAB_RC0), etc.. The default settings are stored in the file 
  43.    'RLab-Preference'. 
  44.    
  45.    To change the settings, just use a text editor to change.  You have to
  46.    set the PLPLOT_DIR environmental variable to the path of your RLaB folder.  
  47.    This setting is important because PLPLOT has to know the location of font 
  48.    files 'plstnd5.fnt' and 'plxtnd5.fnt'.  After making the changes, the file 
  49.    'RLab-Preference' has to be placed in the 'System Folder:Preferences' folder.
  50.  
  51.    For example, if your absolute RLaB folder (directory) path is like
  52.    
  53.    HD --- Appl --- RLaB 
  54.    
  55.    then you can put the following environmental variables in 'RLab-Preference':
  56.    
  57.    RLAB_RC0 = ".rlab";
  58.    PLPLOT_DIR = "HD:Appl:RLaB";
  59.    RLAB_HELP_DIR = "HD:Appl:RLaB:help";
  60.    RLAB_LIB_DIR = "HD:Appl:RLaB:rlib";
  61.    RLAB_SEARCH_PATH = "HD:Appl:RLaB:toolbox;HD:Appl:RLaB:examples"; 
  62.  
  63.    You can have several search-paths, just put them together and use ';' as
  64.    delimiter (see above example with 2 search paths).
  65.    Since RLaB uses absolute search path, the the maximum length of each path 
  66.    is 31 characters in length, don't place RLaB folder too deep in your hard 
  67.    disk directory tree.  Also, don't drag MacRLaB out of RLaB folder, use alias.
  68.    
  69.    If you feel the font/size in the MacRLaB console is not the best choice, 
  70.    feel free to change it.  The environmental variable RLAB_FONT can be set
  71.    to one of the following numbers (check Mac document for more):
  72.    
  73.                0 SystemFont
  74.                1 AppleFont
  75.                2 NewYork
  76.                3 Geneva
  77.                4 Monaco
  78.                5 Venice
  79.                6 London
  80.                7 Athens
  81.                8 SanFrancisco
  82.                9 Toronto
  83.               11 Cairo
  84.               12 LosAngles
  85.               20 Times
  86.               21 Helvetica
  87.               22 Courier
  88.  
  89.    It is better to use constant width fonts such as Monaco and Courier,
  90.    otherwise the output will not be aligned.
  91.    The font size (RLAB_SIZE) can be set to any number from 1 to 127 points.  
  92.    The popular font sizes for the console are 
  93.                
  94.                9 points
  95.               10 points
  96.               11 points
  97.               12 points
  98.               14 points
  99.               18 points
  100.               
  101.    You can change the number of rows (RLAB_ROWS) on the console also.  
  102.    Default values are   
  103.  
  104.               RLAB_FONT = "4 Monaco";
  105.               RLAB_SIZE = "9 points";
  106.               RLAB_ROWS = "25";
  107.    
  108.    If you put RLaB folder in a RAM-disk, you have to rename .rlab to another 
  109.    name without '.' as its first character, then put the new name in RLAB_RC0 
  110.    environmental variable.  MacRLaB will hang if it reads .rlab from a
  111.    RAM-disk.  You tell me why.
  112.    
  113.          
  114. 3. This version of RLaB comes with a built-in plotting library PLPLOT.
  115.    PLPLOT is a powerful tool for XY and XYZ graphics.  It can generate
  116.    (via plprint) Postscript, color Postscript, HP LJ, and lots of other 
  117.    formats for post processing. 
  118.  
  119.    I've implemented a minimum Mac interface for PLPLOT.  Multi-window is 
  120.    allowed but the redrawing is slow.  The number of window is limited 
  121.    to 10.  You can resize graphics windows in this version.
  122.    Because RLaB keeps scanning the command line and providing line 
  123.    editing service, if you wish to watch background graphics windows, you must 
  124.    enter pause mode before you can click any background graphics window.  
  125.    You can enter pause mode by calling function
  126.        pause();
  127.    or type 
  128.        ESC--P
  129.    in RLaB interactive environment (ESC--P means: press ESC, release ESC, 
  130.    press P, release P).   ESC--P is equivalent to ESC--` (on mac extended 
  131.    keyboards, ESC key is near to ` key, see).
  132.        
  133.    The interface is based on ColorQuickDraw routines.  Sixteen colors are 
  134.    directly available in PLPLOT. These colors are pre-assigned as the
  135.    following numbers:
  136.    
  137.      0     1     2       3        4        5      6      7    
  138.    coral  red  yellow  green  aquamarine  pink  wheat  gray
  139.    
  140.      8     9        10       11      12        13      14      15
  141.    brown  blue  blueviolet  cyan  turquoise  magenta  salmon  black 
  142.       
  143.    You can select color by _plcol() function.  More colors are available by
  144.    using RGB combinations (see PLPLOT manual). There are three things remained  
  145.    to be done -- add scroll bar to the MacRLaB window, add copy/paste ability 
  146.    in the graphics windows, and add PICT image to the generated EPS files.
  147.    
  148.    At this stage, you can include the Postscript output (EPSF) in your document
  149.    (Word, MacDraw, Canvas, TeX, ...) but you can only see a big crossed
  150.    box (the bounding box) on the screen due to the lack of PICT image.
  151.    You can perform scaling, rotating, dragging,... on the box except there
  152.    is no picture inside.  The picture will appear in the printed copy.
  153.    If you need superscript, subscript, over/under line char, and Greek letters 
  154.    in annotation of axis, title, etc., then you need to get a copy of PLPLOT 
  155.    manual.  See README.PLPLOT for detail.  Here is an example which uses 
  156.    Greek letters and cursive font,
  157.    
  158.    >load(":examples:fun_plot.r");
  159.    
  160.    or
  161.    
  162.    >rfile fun_plot
  163.    
  164.    Another plotting example is in ":examples:plot_test.r", try
  165.    
  166.    >rfile plot_test
  167.  
  168.    You can click on those background windows to see them again. The graphics 
  169.    windows are numbered as plplot 0, plplot 1, plplot 2, ..., and so on.  You 
  170.    can also resize or drag them.  Resizing on the screen will not affect 
  171.    the quality of later plprint() output.  Also, don't use pend() unless 
  172.    you don't want to plot anymore. Use pclose() instead. 
  173.    
  174.    For each graph window, there is a temporary file (SCRATCH ????) 
  175.    associated with it.  It contains your plotting commands which can be used
  176.    later to produce a Postscript or other types of graphics files (via
  177.    plprint).  It is also used by my Mac interface in redrawing.  Don't dump
  178.    them to trash during the execution of MacRLaB.   They will be automatically 
  179.    eliminated after execution. 
  180.       
  181. 4. By the way, do you know how to change directory using cd() on the Mac?  
  182.    Here is how.
  183.    
  184.    Suppose that your hard disk directory tree is like this
  185.    
  186.                             ----- Peggy
  187.                             |                             |-- rlib
  188.          --------- App -----|                             |
  189.          |                  |                             |-- examples
  190.    HD ---|                  ----- RLaB (you are here) ----|
  191.          |                                                |-- help
  192.          -------- Kevin                                   |
  193.                                                           |-- toolbox
  194.          
  195.    When you launch RLaB, you are in RLaB directory.  If you wish to 
  196.    change directory to "examples", you can use either
  197.    
  198.    >cd(":examples");  // relative method ( cannot use cd("examples"); )
  199.    
  200.    or
  201.    
  202.    >cd("HD:App:RLaB:examples");  // absolute method
  203.    
  204.    The colon ":" means present directory, it is similar to "." on the Unix
  205.    but not exactly the same.  You MUST supply a ":" at first if partial 
  206.    (relative) pathname is used.  If the first character of a pathname is not 
  207.    ":", it is a full (absolute) pathname.  Two colons "::" means parent 
  208.    directory.  Three colons ":::" means grandparent directory.
  209.    
  210.    For example, if your work directory is in Kevin and you are in 
  211.    RLaB now,  you can use either
  212.    
  213.    >cd(":::Kevin");   // relative method
  214.    
  215.    or
  216.    
  217.    >cd("HD:Kevin");   // absolute method
  218.    
  219.    to change directory to Kevin.
  220.    
  221. 5. Your machine must have a MC68020/30/40 and a numerical processor 
  222.    (MC68881 or better) to run RLaB (sorry!).   You don't need a numerical 
  223.    processor on a MC68040 based machine.  You also need System 7 to run it. 
  224.    RLaB is a 32-bit clean program.   The "complex division inaccuracy" problem 
  225.    in previous Mac ports has been fixed.  Try
  226.    
  227.    >load("test")
  228.  
  229.    on your machine to see if your machine can pass all tests.  
  230.       
  231. 6. The total size of arrays is only limited by the available memory of your 
  232.    machine.  If RLaB runs out of memory, it will display
  233.        
  234.         RLaB: out of memory. 
  235.         
  236.    on the screen.  You can either increase RLaB memory using 'Get Info' of 
  237.    System 7 Finder or, if your physical RAM is limited, turn on the virtual
  238.    memory and set memory size large enough for your application.     
  239.  
  240. 7. To interrupt RLaB during execution, type command-. (i.e. press command 
  241.    key + period key), it will return to the interactive mode in the next i/o.  
  242.    To abort RLaB and kick it out, you can use File-Quit (command-Q) on Menu bar. 
  243.    You can also do so by type in command-d at the beginning of a command line.
  244.    If RLaB hangs, type command-option-esc to abort it.
  245.    
  246. 8. Since RLaB interprets your .r code line-by-line, don't forget to press
  247.    'return' at the end of the last line of your .r file.  If you forget to
  248.    do so, a syntax error will issue.  It's hard to debug such error.
  249.    
  250. 9. If you wish to join the RLaB community, send an email to Ian and ask him 
  251.    to add your name in the mailing list.  You can reach the RLaB community by
  252.    sending email to rlab-list@eskimo.com .
  253.    
  254. 10. We need more toolboxes.  Please send your useful .r files to Ian.  Thanks.
  255.  
  256. 11. THIS IS FREE SOFTWARE. THERE IS NO WARRANTY FOR THE PROGRAM.  USE IT AT 
  257.     YOUR OWN RISK.  
  258.  
  259. Have fun!
  260.  
  261. Tzong-Shuoh Yang   
  262. (tsyang@ce.berkeley.edu) 
  263.